package com.zx.erp.sys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {
    @RequestMapping("/")
    public String hello() {
        return "/login";
    }

    /**
     * 用于测试
     *
     * @param path
     * @return
     */
    @RequestMapping("/{path}")
    public String getPath(@PathVariable("path") String path) {
        return "/" + path;
    }

    /**
     * 用于测试
     *
     * @param page
     * @param page1
     * @param page2
     * @return
     */
    @RequestMapping("/{path}/{path1}/{path2}")
    public String hello(@PathVariable("path") String page, @PathVariable("path1") String page1, @PathVariable("path2") String page2) {
        String path = page + "/" + page1 + "/" + page2;
        return path;
    }

}
